package com.zxy.supplier_system.server.utils.wechat
class WechatApiException(
        val errorCode: Int,
        val errorMessage: String? = null
) : RuntimeException("Error code: $errorCode, Error message: $errorMessage")

internal fun checkErrorCode(code: Int, message:String?) {
        if (code!=0){
                throw  WechatApiException(code,message)
        }
}

data class WechatApiErrorResponse(
        val errcode:Int,
        val errmsg: String?,
)